import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

const router = new Router({
  routes: [
    {
      path: "/",
      name: "下载地址管理页面",
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () =>
        import(/* webpackChunkName: "about" */ "./views/apppath.vue")
    }
  ]
});

router.beforeEach((to, from, next) => {
  if (to.name && to.name != '') {
    document.title = to.name;
  }
  next();
})

export default router
